package org.jeecg.modules.zcgl.service;


import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zcgl.entity.Order;
import org.jeecg.modules.zcgl.entity.OrderDetails;
import org.jeecg.modules.zcgl.entity.ReceivablesInfo;
import org.jeecg.modules.zcgl.tencent.vo.WxPayResultVo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 微信用户付款订单信息
 * @Author: jeecg-boot
 * @Date:   2020-07-13
 * @Version: V1.0
 */
public interface IOrderService extends IService<Order> {

    /**
     * 添加一对多
     *
     */
    public boolean saveMain(Order order, List<OrderDetails> orderDetailsList) ;

    /**
     * 修改一对多
     *
     */
    public boolean updateMain(Order order, List<OrderDetails> orderDetailsList);

    /**
     * 删除一对多
     */
    public boolean delMain (String id);
    public boolean delPhysicalMain (String id);

    /**
     * 批量删除一对多
     */
    public boolean delBatchMain (Collection<? extends Serializable> idList);

    /**
     * 更新订单状态
     * @param id
     * @param payStatus
     */
    boolean updatePayStatusById(String id, Integer payStatus);

    /**
     * 微信支付处理
     * @param wxPayResultVo
     */
    boolean updateWxPay(WxPayResultVo wxPayResultVo);

//    @Transactional
//    void creatorOrder(BigDecimal amountMoney, Integer orderType, ReceivablesInfo receivablesInfo);

    boolean creatorOrder(BigDecimal amountMoney, Integer orderType, String customerId, ReceivablesInfo receivablesInfo);
}
